package com.zzb.method;

public class MethodTest2 {
    public static void main(String[] args) {
        int[] arr = {55, 86, 7541, 3};
        printArr(arr);
    }

    /**
     * 打印数组
     */
    public static void printArr(int[] arr) {
        System.out.print("[");
        for (int i = 0; i < arr.length - 1; i++) {
            System.out.print(arr[i] + ",");
        }
        System.out.print(arr[arr.length - 1] + "]");
    }
}
